package io.adrainty.bolee.task.job;

import io.adrainty.bolee.file.feign.IFileBusinessFeign;
import io.adrainty.bolee.framework.commons.basic.ResultDTO;
import io.adrainty.bolee.framework.commons.utils.ResultDTOUtil;
import io.adrainty.framework.job.basic.AbstractXxlJobExecutor;
import jakarta.annotation.Resource;
import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Component;

/**
 * <p>ClearFileHandlerJob</p>
 *
 * @author AdRainty
 * @version V1.0.0
 * @description ClearFileHandlerJob
 * @since 2025/8/18 14:55:58
 */

@Slf4j
@Component
public class ClearFileHandlerJob extends AbstractXxlJobExecutor<ClearFileHandlerJob> {

    @Resource
    private IFileBusinessFeign fileBusinessFeign;

    @Override
    protected void doExecute() {
        ResultDTO<Boolean> resultDTO = fileBusinessFeign.clearFile();
        ResultDTOUtil.assertResultSuccess(resultDTO);
    }

    @Override
    protected Class<ClearFileHandlerJob> getJobClass() {
        return ClearFileHandlerJob.class;
    }

}
